package com.growthgate.bootcommon.amqp.receiver;

import com.growthgate.bootcommon.config.RabbitMqConfig;
import com.growthgate.bootcommon.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * DirectReceiver
 *
 * @author GrowthGate
 * @date 2019/10/29
 */
@Slf4j
@Component
public class DirectReceiver {

    @RabbitListener(queues = RabbitMqConfig.DIRECT_QUEUE)
    public void receiveDirect1(User user) {
        log.info("receiveDirect1监听到消息：" + user);
    }

    @RabbitListener(queues = RabbitMqConfig.DIRECT_QUEUE)
    public void receiveDirect2(User user) {
        log.info("receiveDirect2监听到消息：" + user);
    }

}